package ordersmonthly

// OrderMonthlyModel 包月订单
type OrderMonthlyModel struct {
	OrderMonthlyDB
	PayTime         string `gorm:"column:pay_time" json:"payTime"`
	RenewTime       string `gorm:"column:renew_time" json:"renewTime"`
	CreateTime      string `gorm:"column:create_time" json:"createTime"`
	UpdateTime      string `gorm:"column:update_time" json:"updateTime"`
	UpdateRenewTime string `gorm:"column:update_renew_time" json:"updateRenewTime"`
}

type OrderMonthlyRenewDB struct {
	OrderMonthlyDB
	RenewTime string `gorm:"column:renew_time" json:"renewTime"`
}

type OrderMonthlyRenewTypeDB struct {
	OrderMonthlyDB
	RenewTime  string `gorm:"column:renew_time" json:"renewTime"`
	PeriodType uint8  `gorm:"column:period_type" json:"periodType"`
}

type OrderMonthlyDB struct {
	Id           int    `gorm:"column:id" json:"id"`
	MemberId     int    `gorm:"column:member_id" json:"memberId"`
	PlaceId      int    `gorm:"column:place_id" json:"placeId"`
	Amount       int    `gorm:"column:amount" json:"amount"`
	Status       uint8  `gorm:"column:status" json:"status"`
	RenewStatus  uint8  `gorm:"column:renew_status" json:"renewStatus"`
	PayType      uint8  `gorm:"column:pay_type" json:"payType"`
	ThirdTradeNo string `gorm:"column:third_trade_no" json:"thirdTradeNo"`
	TradeNo      string `gorm:"column:trade_no" json:"tradeNo"`
	DeviceSn     string `gorm:"column:device_sn" json:"deviceSn"`
	PlaceName    string `gorm:"column:place_name" json:"placeName"`
	MemberName   string `gorm:"column:member_name" json:"memberName"`
	MemberPhone  string `gorm:"column:member_phone" json:"memberPhone"`
	Message      string `gorm:"column:message" json:"message"`
	AgreementNo  string `gorm:"column:agreement_no" json:"agreementNo"`
	ProductId  string `gorm:"column:product_id" json:"productId"`
}

func (m *OrderMonthlyDB) TableName() string {
	return "order_monthly"
}
